﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MyRabbit.EntityFrameWorkCore.Migrations
{
    public partial class add0 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ExpirationDate",
                table: "Products");

            migrationBuilder.RenameColumn(
                name: "SlaughterId",
                table: "Products",
                newName: "SlaughteId");

            migrationBuilder.RenameColumn(
                name: "ProductNumber",
                table: "Products",
                newName: "LicenseNumber");

            migrationBuilder.RenameColumn(
                name: "ProducEnterprise",
                table: "Products",
                newName: "Enterprise");

            migrationBuilder.AddColumn<int>(
                name: "ShelfLife",
                table: "Products",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ShelfLife",
                table: "Products");

            migrationBuilder.RenameColumn(
                name: "SlaughteId",
                table: "Products",
                newName: "SlaughterId");

            migrationBuilder.RenameColumn(
                name: "LicenseNumber",
                table: "Products",
                newName: "ProductNumber");

            migrationBuilder.RenameColumn(
                name: "Enterprise",
                table: "Products",
                newName: "ProducEnterprise");

            migrationBuilder.AddColumn<DateTime>(
                name: "ExpirationDate",
                table: "Products",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
        }
    }
}
